Micron Document
πŸŽ–οΈGitΠ―Ρ€Π°πŸŽ–οΈ


Displaying Rendered β€’ View raw β€’ Download

docs/ht-rHT/user/mqtt.md renovate/fastlane-2.x-lockfile (423f9d44) Text, 12.46 KB

title: MQTT
parent: User Guide
nav_order: 11
last_updated: 2026-09-11
description: Bridge your mesh to the internet β€” MQTT broker setup, encryption layers, and map reporting.
aliases:
β€’ mqtt
β€’ internet-bridge
β€’ broker

MQTT

MQTT bridges your Meshtastic mesh network to the internet, enabling long-range communication beyond radio range.

Overview

The MQTT module connects your node to an MQTT broker, allowing:

β€’ Messages to reach nodes on different physical meshes via the internet
β€’ Integration with home automation and monitoring systems
β€’ Publishing node positions to the public Meshtastic map
β€’ Custom data pipelines for logging and alerting

How It Works

T282828
[Your Node] β†’ Radio β†’ [Gateway Node with Wi-Fi] β†’ MQTT Broker β†’ [Remote Gateway] β†’ Radio β†’ [Remote Node]

A gateway node with internet access (Wi-Fi or Ethernet) publishes mesh messages to an MQTT topic. Remote gateways subscribed to the same topic inject those messages into their local mesh.

Configuration

Enabling MQTT

1. Navigate to Settings β†’ Module configuration β†’ MQTT.
2. Enable the MQTT module.
3. Configure the broker connection:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Setting β”‚ De… β”‚ Default β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Address β”‚ MQ… β”‚ mqtt.meshtastic.org β”‚
β”‚ Username β”‚ Br… β”‚ meshdev β”‚
β”‚ Password β”‚ Br… β”‚ large4cats β”‚
β”‚ Root topic β”‚ Ba… β”‚ T383838msh, which the radio rewrites to T383838msh/<REGION> once you set a re… β”‚
β”‚ Encryption enabled β”‚ En… β”‚ Enabled β”‚
β”‚ JSON output enabled β”‚ Al… β”‚ Disabled β”‚
β”‚ TLS enabled β”‚ Se… β”‚ Disabled β”‚
β”‚ Map reporting β”‚ Re… β”‚ Disabled β”‚
β”‚ Proxy to client enabled β”‚ Re… β”‚ Disabled β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Connection Status and Test Connection

The top of the MQTT settings screen shows the status of the relay this phone runs β€”
Connected, Connecting, Reconnecting, Disconnected, or Inactive. It reads
Inactive whenever the phone is not relaying, which includes the normal case of a radio
reaching the broker over its own Wi-Fi or Ethernet. The radio's own connection to the broker is
not reported here.

Test connection probes the broker before you commit the settings to the radio, and
distinguishes the failure modes: the hostname not resolving, the TCP connection being refused,
TLS failing, the attempt timing out, or the broker rejecting your credentials with a reason.

MQTT Proxy on This Phone

If your radio has no internet access of its own, it can use the connected phone as its MQTT gateway: enable MQTT and Proxy to client enabled in the module config, and the app relays MQTT traffic between the radio and the broker over your phone's internet connection.

β”‚ ℹ️ Note: The proxy relay is mobile-only. On the Desktop app the MQTT settings are present, but no
β”‚ relay runs behind them.

The MQTT proxy on this phone toggle at the top of the MQTT settings screen shows whether this relay is running and lets you cut it off (or restart it) immediately β€” without editing and re-saving the radio's MQTT configuration.

Default Meshtastic Broker

The community maintains a public broker at T383838mqtt.meshtastic.org. This is intended for general use and testing.

When this phone relays MQTT for the radio, connections to that broker always use TLS on port 8883 even if TLS enabled is off β€” the app forces the switch on and grays it out. A radio that reaches the broker over its own Wi-Fi or Ethernet forces nothing: turn TLS enabled on yourself, or it connects in the clear on port 1883. For any other broker the toggle decides in both cases (port 8883 with TLS, 1883 without).

β”‚ πŸ”’ Privacy: Messages on the public broker are readable by anyone subscribed. Always use channel
β”‚ encryption for private communications.

Private Broker

For better privacy and control, you can run your own MQTT broker:

β€’ Mosquitto (lightweight, open-source)
β€’ HiveMQ
β€’ EMQX

Configure your node to point to your private broker with appropriate credentials.

Map Reporting

When Map reporting is on, your node periodically publishes a map report to the broker. The report goes out unencrypted, whatever keys your channels use, and carries your node id, long and short name, approximate location, hardware model, role, firmware version, LoRa region, modem preset, and primary channel name.

Turning it on opens a consent card. Turn on I agree. and choose a Map reporting interval (seconds) of one hour or more β€” the screen will not save until you do. A slider sets the position precision, and the app shows the resulting accuracy as a Β± distance, so you can publish an approximate location rather than an exact one.

Reports appear at meshmap.net and similar community map services.

β”‚ πŸ”’ Privacy: A map report is readable by anyone subscribed to the broker. Leave Map reporting off
β”‚ if you do not want your approximate location published.

Uplink vs Downlink

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Direction β”‚ Deskripsyon β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Uplink β”‚ Messages from mesh β†’ MQTT broker β”‚
β”‚ Downlink β”‚ Messages from MQTT broker β†’ mesh β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Uplink and downlink are per-channel settings, not MQTT module settings. Open Settings β†’ Channels, tap the channel, and use MQTT Uplink Enabled and MQTT Downlink Enabled. Every channel you want bridged out needs uplink on, and every channel you want MQTT traffic injected into needs downlink on.

Message Formats

MQTT carries two payload formats:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Format β”‚ Deskripsyon β”‚ Use case β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Protobuf β”‚ Binary Meshtastic protobuf encoding β”‚ Node-to-node mesh bridging β”‚
β”‚ JSON β”‚ Human-readable JSON on the T383838/2/json/ topic β”‚ Consumers outside the mesh (dashboards, … β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

β”‚ ℹ️ Note: T383838json_enabled is marked deprecated in the protobuf schema, but it has not been replaced
β”‚ and it is not ignored. When it is on, the app's own MQTT proxy subscribes to the T383838/2/json/ topic
β”‚ and decodes those payloads.

Encryption & Privacy

Understanding the layered encryption model:

1. Channel encryption happens on the mesh before MQTT. If your channel has a PSK, the MQTT payload is already encrypted β€” the broker and any subscribers see only the ciphertext.
2. Encryption enabled (the module setting) decides which copy of the packet the gateway publishes β€” it is not an extra layer. Leave it on and the broker receives the packet still encrypted with your channel key. Turn it off and the gateway publishes the decrypted packet, so anyone subscribed to the topic reads your messages in the clear. Turn it off only when you own the broker and want plain payloads for a dashboard.
3. TLS encrypts the TCP connection to the broker itself, preventing network-level eavesdropping.

β”‚ πŸ”’ Security: The default public channel has a well-known key. Messages on the default channel
β”‚ sent via MQTT are effectively unencrypted β€” anyone can decode them. Always use a custom PSK for
β”‚ private communications.

Best Practices

β€’ Use channel-level encryption (PSK) on channels that bridge to MQTT
β€’ Don't enable MQTT on nodes without internet access (the radio buffers unsendable messages and wastes memory)
β€’ Use a private broker for sensitive deployments
β€’ Be mindful of airtime when downlinking messages from busy MQTT topics β€” every downlinked message consumes radio airtime on your local mesh
β€’ Consider enabling uplink-only if you only need to monitor your mesh remotely without injecting messages back

Troubleshooting

MQTT Not Connecting

β€’ Check Wi-Fi β€” the gateway node must have an active internet connection (Wi-Fi or Ethernet). MQTT does not work over the LoRa radio link itself.
β€’ Verify credentials β€” with incorrect credentials, most brokers fail silently β€” double-check for trailing spaces.
β€’ Firewall β€” port 1883 (MQTT) or 8883 (MQTT over TLS) must be reachable. Some networks allow only web traffic (ports 80 and 443).
β€’ DNS resolution β€” if using a custom broker hostname, verify the node can resolve it. Try the broker's IP address directly.

Messages Not Bridging

β€’ Check uplink/downlink settings β€” if only uplink is enabled, messages flow from mesh to MQTT but not back. Enable downlink on the receiving gateway.
β€’ Channel mismatch β€” both gateways must share the same channel with the same PSK. A mismatch means messages are encrypted with different keys and appear as garbage.
β€’ Topic mismatch β€” both gateways must use exactly the same root topic. Setting a region rewrites a default root to T383838msh/<REGION> (for example T383838msh/US), so gateways in different regions do not meet until you give both the same explicit root.
β€’ Ignore MQTT is on β€” in a region with a duty-cycle limit, the radio turns on Ignore MQTT (LoRa config, Advanced) when you set the region, and then drops every packet that reached it via MQTT. Turn it off on the receiving nodes, not only on the gateway.
β€’ Ok to MQTT is off β€” on a public broker a gateway uplinks other nodes' packets only when the sending node has Ok to MQTT (LoRa config, Advanced) on. Your own traffic bridges either way; your neighbors' does not until they opt in.

Related Topics

β€’ Settings β€” Modules & Admin β€” MQTT module configuration reference
β€’ Messages & Channels β€” channel encryption and PSK setup
β€’ MQTT integration guide β€” detailed MQTT documentation on meshtastic.org

Served by rngit 1.5.4 - Generated in 0.04s